package android07.newtop.model;

import android07.newtop.model.bean.PictureClassify;
import android07.newtop.model.bean.PictureDetail;
import android07.newtop.model.bean.PictureGallery;
import android07.newtop.model.bean.WeatherInfoBean;
import retrofit2.Call;
import retrofit2.Callback;


/**
 * 获取天气信息的Model
 */
public class PictureModel {


    /**
     * 从天狗云 获取图片分类
     * @param callback
     */
    public void getPictureClassify(Callback<PictureClassify> callback) {

        ApiService service = Retrofit2Util.getRetrofit("http://www.tngou.net/").create(ApiService.class);
        Call<PictureClassify> call = service.getPictureClassify();
        call.enqueue(callback);
    }

    /**
     * 从天狗云 获取图片分类
     * @param callback
     */
    public void getPictureGallery(int page ,Callback<PictureGallery> callback) {

        ApiService service = Retrofit2Util.getRetrofit("http://www.tngou.net/").create(ApiService.class);
        Call<PictureGallery> call = service.getPictureGallery(page+"","10","1");
        call.enqueue(callback);
    }
    /**
     * 从天狗云 获取图片分类
     * @param callback
     */
    public void getPictureDetail(int id ,Callback<PictureDetail> callback) {

        ApiService service = Retrofit2Util.getRetrofit("http://www.tngou.net/").create(ApiService.class);
        Call<PictureDetail> call = service.getPictureDetail(id);
        call.enqueue(callback);
    }
}
